package com.mtconnect.common;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidDataSourceFactory;

import java.math.BigDecimal;

/**
 * Created by zhaolu on 2017/7/28.
 */
public class DBConnectionFactory {
    private DruidDataSource dataSource;
    private DruidDataSourceFactory dataSourceFactory;

    public static void main(String[] args) {
        BigDecimal a = new BigDecimal(57000L);
        BigDecimal b = new BigDecimal(10000L);
        BigDecimal tempTime = a.divideToIntegralValue(b);
        BigDecimal subtract = a.subtract(b.multiply(tempTime));

        System.out.println(subtract.intValue());
    }
}
